package lumis.portal.crypto;

import lumis.portal.stability.StableMinor;

/**
 * Manages cryptographic related operations.
 * 
 * @version $Revision: 13082 $ $Date: 2011-05-27 16:03:12 -0300 (Fri, 27 May 2011) $
 * @since 5.5.0
 */
@StableMinor(version = "6.0", sinceVersion = "5.5")
public interface ICryptoManager
{
	/**
	 * Returns a one-way cipher.
	 * <p>
	 * The actual cipher returned depends on the encryption configuration
	 * in <code>lumisportalconfig.xml</code>. It is recommended that the one-way
	 * cipher is configured to use an algorithm that is not possible to decrypt.
	 * In this case, the cipher will throw {@link UnsupportedOperationException}
	 * in its decrypt methods.
	 * @return the cipher.
	 * @since 5.5.0
	 */
	public ICipher getOneWayCipher();
	
	/**
	 * Returns a cipher that is able to encrypt data, and decrypt it back.
	 * <p>
	 * The actual cipher returned depends on the encryption configuration
	 * in <code>lumisportalconfig.xml</code>.
	 * @return the cipher.
	 * @since 5.5.0
	 */
	public ICipher getReversibleCipher();
}
